/*
import request from '../utils/request';

export const fetchData = (query) => {
    return request({
        url: '/ms/table/list',
        method: 'post',
        data: query
    })
}*/


import {ajax} from '../utils/ajax';

const BASE_URL = '/api'//跨域 //DEV
const SERVER_BASE = ''  //LOCAL

/*------------------Demo-------------------*/
const REQUESTLOGIN = SERVER_BASE + '/user/checkLogin';
export const requestLogin=(params) => ajax(BASE_URL + REQUESTLOGIN, params,"POST");

/*---wxd---*/
//写入请假数据
const REQUEST_LEAVE=SERVER_BASE+'/user/leave';
export const requestLeave=(params)=>ajax(BASE_URL+REQUEST_LEAVE,params,"POST")
//根据人员ID查询考勤情况
const REQUEST_MANAGE=SERVER_BASE+'/user/manage';
export const requestManage=(params)=>ajax(BASE_URL+REQUEST_MANAGE,params,"POST")
//根据ID查询工作内容
const  REQUEST_GETJOB=SERVER_BASE+'/user/getJobById';
export const requestGetJobById=(params)=>ajax(BASE_URL+REQUEST_GETJOB,params,"POST")
//写入签到数据
const REQUEST_SIGN=SERVER_BASE+'/user/sign';
export const requestSign=(params)=>ajax(BASE_URL+REQUEST_SIGN,params,"POST")
//查询房间状态
const REQUEST_ROOM=SERVER_BASE+'/user/room';
export const requestRoom=(params)=>ajax(BASE_URL+REQUEST_ROOM,params,"POST")
const REQUEST_GET_ALL_USER_INFO_BY_MARK=SERVER_BASE+'/manage/getAllUserInfoByMark'
export const requestGetAllUserInfoByMark=(params)=>ajax(BASE_URL+REQUEST_GET_ALL_USER_INFO_BY_MARK,params,"POST")
const REQUEST_GET_ORDER_BY_ID=SERVER_BASE+'/manage/getOrderById'
export const requestGetOrderById=(params)=>ajax(BASE_URL+REQUEST_GET_ORDER_BY_ID,params,"POST")
const REQUEST_DELETE_USER_BY_ID=SERVER_BASE+'/manage/deleteUserById'
export const requestDeleteUserById=(params)=>ajax(BASE_URL+REQUEST_DELETE_USER_BY_ID,params,"POST")
const REQUEST_UPDATE_ROOMSTATUS_BY_ROOMID=SERVER_BASE+'/manage/updateRoomStatusByRoomId'
export const requestUpdateRoomStatusById=(params)=>ajax(BASE_URL+REQUEST_UPDATE_ROOMSTATUS_BY_ROOMID,params,"POST")
const REQUEST_UPDATE_USER_INFO=SERVER_BASE+'/manage/updateUserInfo'
export const requestUpdateUserInfo=(params)=>ajax(BASE_URL+REQUEST_UPDATE_USER_INFO,params,"POST")
const REQUEST_UPDATE_ORDER=SERVER_BASE+'/manage/updateOrder'
export const requestUpdateOrder=(params)=>ajax(BASE_URL+REQUEST_UPDATE_ORDER,params,"POST")
const REQUEST_GET_MANAGEINFO=SERVER_BASE+'/manage/getManageInfo'
export const requestGetManageInfo=(params)=>ajax(BASE_URL+REQUEST_GET_MANAGEINFO,params,"POST")
const REQUEST_UPDATE_REASON=SERVER_BASE+'/manage/updateReason'
export const requestUpdateReason=(params)=>ajax(BASE_URL+REQUEST_UPDATE_REASON,params,"POST")
const REQUEST_DELETE_MANAGE_INFO=SERVER_BASE+'/manage/deleteManageInfo'
export const requestDeleteManageInfo=(params)=>ajax(BASE_URL+REQUEST_DELETE_MANAGE_INFO,params,"POST")

const REQUEST_UPDATE_MANAGE_INFO=SERVER_BASE+'/manage/updateManageInfo'
export const requestUpdateManageInfo=(params)=>ajax(BASE_URL+REQUEST_UPDATE_MANAGE_INFO,params,"POST")

const REQUEST_ADD_USER_INFO=SERVER_BASE+'/manage/addUserInfo'
export const requestAddUserInfo=(params)=>ajax(BASE_URL+REQUEST_ADD_USER_INFO,params,"POST")

const REQUEST_GET_LEAVE_TIMES=SERVER_BASE+'/manage/getLeaveTimes'
export const requestGetLeaveTimes=(params)=>ajax(BASE_URL+REQUEST_GET_LEAVE_TIMES,params,"POST")

const REQUEST_GET_REGISTTIMES=SERVER_BASE+'/manage/getRegistTimes'
export const requestGetRegistTimes=(params)=>ajax(BASE_URL+REQUEST_GET_REGISTTIMES,params,"POST")

const REQUEST_GET_ALL_POST_INFO=SERVER_BASE+'/manage/getAllPostInfo'
export const requestGetAllPostInfo=(params)=>ajax(BASE_URL+REQUEST_GET_ALL_POST_INFO,params,"POST")

const REQUEST_GET_ALL_USER_INFO=SERVER_BASE+'/manage/getAllUserInfo'
export const requestGetAllUserInfo=(params)=>ajax(BASE_URL+REQUEST_GET_ALL_USER_INFO,params,"POST")

const REQUEST_UPDATE_POST_TYPE_INFO=SERVER_BASE+'/manage/updatePostTypeInfo'
export const requestUpdatePostTypeInfo=(params)=>ajax(BASE_URL+REQUEST_UPDATE_POST_TYPE_INFO,params,"POST")

const REQUEST_GET_SALARY_BY_POST_TYPE=SERVER_BASE+'/manage/getSalaryByPostType'
export const requestGetSalaryByPostType=(params)=>ajax(BASE_URL+REQUEST_GET_SALARY_BY_POST_TYPE,params,"POST")

const REQUEST_UPDATE_PAY_BY_ID=SERVER_BASE+'/manage/updatePayById'
export const requestUpdatePayById=(params)=>ajax(BASE_URL+REQUEST_UPDATE_PAY_BY_ID,params,"POST")

const REQUEST_SETTLE_PAY=SERVER_BASE+'/manage/settlePay'
export const requestSettlePay=(params)=>ajax(BASE_URL+REQUEST_SETTLE_PAY,params,"POST")
/*------------demo end-------------------*/

/*---wyh methods---*/
/*获取所有管理员和职员的信息*/
const REQUESTUSER = SERVER_BASE + '/user/getAllUserInfo';
export const requestGetUserInfo=(params) =>ajax(BASE_URL + REQUESTUSER, params, "POST");
/*获取某个管理员或者员工的所有打卡信息*/
const REQUSETREGIST = SERVER_BASE + '/manage/getRegistInfoById';
export const requestGetRegistInfo=(params) =>ajax(BASE_URL + REQUSETREGIST, params, "POST");
/*获取所有的职位信息*/
const REQUESTSERVE = SERVER_BASE + '/post/getAllServe';
export const requestGetServeOptions=(params) =>ajax(BASE_URL + REQUESTSERVE, params, "POST");
/*通过id查找修改用户任职信息*/
const REQUESTEDITSERVE = SERVER_BASE + '/user/editServeInfoById';
export const requestEditUserInfo=(params) =>ajax(BASE_URL + REQUESTEDITSERVE, params, "POST");
/*查询所有的请假信息*/
const REQUESTLEAVEPERMISSION = SERVER_BASE + '/manage/getAllLeaveInfo';
export const requestLeavePermission=(params) =>ajax(BASE_URL + REQUESTLEAVEPERMISSION, params, "POST");
/*通过日期查询请假信息*/
const REQUESTLEAVEINFOBYDATE = SERVER_BASE + '/manage/getLeaveByDate';
export const requestGetLeaveByDate=(params) =>ajax(BASE_URL + REQUESTLEAVEINFOBYDATE, params, "POST");
/*不同意请假*/
const REQUESTDISAGREE = SERVER_BASE + '/manage/disagree';
export const requestDisagree=(params) =>ajax(BASE_URL + REQUESTDISAGREE, params, "POST");
/*显示某天的打卡信息*/
const REQUESTREGISTINFOBYTIME = SERVER_BASE + '/manage/getRegistInfoByTime';
export const requestGetRegistInfoByTime=(param) =>ajax(BASE_URL + REQUESTREGISTINFOBYTIME, param, "POST");
/*获取所有的通知信息*/
const REQUESTALLNOTICE = SERVER_BASE + '/notice/getAllNotice';
export const requestGetAllNotice=(params) => ajax(BASE_URL + REQUESTALLNOTICE, params, "POST");
/*获取所有管理员*/
const REQUESTALLADMIN = SERVER_BASE + '/user/getAllAdmin';
export const requestGetAllAdmin=(params) => ajax(BASE_URL + REQUESTALLADMIN, params, "POST");
/*通过id搜索管理员发布的通知*/
const REQUESTADMINBYID = SERVER_BASE + '/notice/getAdminById';
export const requestGetAdminById=(params) => ajax(BASE_URL + REQUESTADMINBYID, params, "POST");
/*通过某个时间范围搜索某个管理员发布的通知*/
const REQUESTNOTICEBYTIME = SERVER_BASE + '/notice/getNoticeByTime';
export const requestNoticeByTime=(params) => ajax(BASE_URL + REQUESTNOTICEBYTIME, params, "POST");
/*添加通知*/
const REQUESTADDNOTICE = SERVER_BASE + '/notice/addNotice';
export const requestAddNotice=(params) => ajax(BASE_URL + REQUESTADDNOTICE, params, "POST");

/*ss*/
const REQUESTUSERLOGIN = SERVER_BASE + '/user/checkLogin';
export const requestUserLogin=(params) => ajax(BASE_URL + REQUESTUSERLOGIN, params,"POST");
const REQUESTSTAFFINFO = SERVER_BASE + '/user/getStaffInfo';
export const requestStaffInfo=(params) => ajax(BASE_URL + REQUESTSTAFFINFO, params,"POST");
const REQUEST_REGISTER = SERVER_BASE+'/user/Register';
export const requestRegister=(params)=>ajax(BASE_URL+REQUEST_REGISTER,params,"POST");
const REQUEST_ORDERINFO = SERVER_BASE+'/user/getOrderInfo';
export const requestOrderInfo=(params)=>ajax(BASE_URL+REQUEST_ORDERINFO,params,"POST");
const REQUEST_ORDERINFOBYTEL = SERVER_BASE+'/user/getOrderInfoByTel';
export const requestOrderInfoByTel=(params)=>ajax(BASE_URL+REQUEST_ORDERINFOBYTEL,params,"POST");

/*lyl*/
//更改用户信息界面的用户信息
export const addUserInfo=(params) => ajax(BASE_URL + ADD_USER_INFO, params,"POST");
const ADD_USER_INFO = SERVER_BASE + '/user/addUserInfo';

export const getUserInfo=(params) => ajax(BASE_URL + GTE_USER_INFO, params,"POST");
const GTE_USER_INFO = SERVER_BASE + '/user/getUserInfo';

export const addOrderInfo=(params) => ajax(BASE_URL + ADD_ORDER_INFO, params,"POST");
const ADD_ORDER_INFO = SERVER_BASE + '/order/addOrderInfo';

export const getOrderInfo=(params) => ajax(BASE_URL + GET_ORDER_INFO, params,"POST");
const GET_ORDER_INFO = SERVER_BASE + '/order/getOrderInfo';

export const deleteCurRow=(params) => ajax(BASE_URL + DELETE_ORDER_INFO, params,"POST");
const DELETE_ORDER_INFO = SERVER_BASE + '/order/deleteCurRow';